{% extends "evaluation/base_app.html" %}
{% load switchcase %}

{% block content %}
{% ifequal objects.count 0 %}
NO SUBMISSIONS FOUND
{% else %}


<table><tr>
  <td>Active</td>
  <td>Id</td>
  <td>Method</td>
  <td>Title</td>
  <td>Challenge</td>
  <td>Status</td>
  <td>Score</td>
  <td>When</td>  
</tr>

{% for s in objects %}
<tr>
<td>
  {% ifequal s.when s.most_recent %}
    <b>active{% ifequal s.state 3 %}+{% endifequal %}{% ifequal s.state 5 %}+{% endifequal %}</a>
{% endifequal %}</td>
<td><a href="/eval/view_submission/{{s.id}}/">{{s.id}}</a></td>

<td>{{s.method}}</td>
<td>{{s.title}}</td>

  <td>{{s.to_challenge.name}}</td>
  <td>{{s.get_state_display}}</td>


<td> 

{% if s.to_challenge.is_score_visible %} 
{{s.score}} 
{% endif %}

</td>
  {% comment %}
  {% for o in s.submissionscore_set.all %}
  {{o.category}}({{o.score}})  
  {% endfor %}
  {% endcomment %}
</td>
<td>
  {{s.when|date:"d M Y, H:i" }} 
</td></tr>
{% endfor %}
</table>
<hr/>
<b>active</b> marks the submission, that will enter the competition. Only the most recent submission for each method will count.<br/>
<b>active+</b> marks active submissions, where evaluation was successful.

{% endifequal %} 

{% endblock %}
